﻿using System;
using System.Linq;

class MaxEqualElements
{
    static void Main(string[] args)
    {
        int[] arr = { 2, 1, 1, 2, 3, 3, 2, 2, 2, 2, 1 };
        int index = 0;
        int length = 0;
        int count = 1;
        int maxCount = 0;


        for (int i = 1; i < arr.Length; i++)
        {
            if (arr[i] == arr[i - 1])
            {
                count++;
                if (maxCount < count)
                {
                    maxCount = count;
                    index = i;
                }
                length = maxCount;
            }
            else
            {
                count = 1;
            }

        }

        for (int i = index - length + 1; i <= index; i++)
        {
            Console.Write(arr[index]);
        }

        Console.WriteLine();
    }
}
